{extend name="base" /} {block name="body"}
<div class="layui-body">
	<div class="navbar">
		<a><cite>农资商城</cite></a>&nbsp;<span class="layui-box">&gt;</span>
		<a href="{:url('index')}"><cite>地址管理</cite></a>&nbsp;<span class="layui-box">&gt;</span>
		<a href=""><cite>添加地址</cite></a>
	</div>
	<!--tab标签-->
	<div class="layui-tab layui-tab-card margin10">
		<ul class="layui-tab-title">
			<li class="layui-this">添加地址</li>
		</ul>
		<div class="layui-tab-content">
			<form class="layui-form form-container layui-form-pane" action="{:url()}" method="post">
				<div class="layui-form-item">
					<label class="layui-form-label">上级地址</label>
					<div class="layui-input-block">
						<select name="pid" lay-verify="required">
							<option value="0">一级地址</option>
							{foreach name="cate_list" item="vo"}
							<option value="{$vo.id}" {if condition="$pid==$vo.id" } selected="selected" {/if}>{neq name="vo.level" value="1"}| {for start='1' end='$vo.level'} ---- {/for} {/neq} {$vo.name}</option>
							{/foreach}
						</select>
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">地址名称</label>
					<div class="layui-input-block">
						<input type="text" name="name" value="" required lay-verify="required" placeholder="请输入分类名称" class="layui-input">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">排序</label>
					<div class="layui-input-block">
						<input type="text" name="sort" value="0" required lay-verify="required" class="layui-input">
					</div>
				</div>
				<div class="layui-form-item">
					<div class="layui-input-block">
						<button class="layui-btn" lay-submit lay-filter="*"><i class="fa fa-save"></i> 添加</button>
						<a href="{:url('index')}" class="layui-btn layui-btn-primary"><i class="fa fa-arrow-left"></i> 返回</a>
					</div>
				</div>
			</form>
		</div>
	</div>
</div>
{/block} {block name='script'}

{/block}